<template>
    <div id="echarts" ref="echart">
        
    </div>
</template>

<script>
import * as echarts from "echarts";
import {getReportData} from 'api/goods'
    export default {
        name:"report",
        methods: {
           async createReport(){
               try {
                const data=await getReportData();
                const echart=echarts.init(this.$refs.echart);
                    echart.setOption(data)
               } catch (error) {
                
               }
           }
        },
        mounted(){
           this.createReport();
        },
    }
</script>

<style lang="scss" scoped>
#echarts{
    height: 500px;
}
</style>